<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class ChannelPeriod extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'channel_periods';
    public $timestamps = false;

    const STATUS_ENABLE = 1;
    const STATUS_DISABLE = 0;

    public static function getStatusOption(): array
    {
        return [
            self::STATUS_ENABLE => '启用',
            self::STATUS_DISABLE => '禁用',
        ];
    }

    public static function getStatusColorMap(): array
    {
        return [
            self::STATUS_ENABLE => 'success',
            self::STATUS_DISABLE => 'danger',
        ];
    }

    /**
     * getDayOfWeekList
     * @return array
     * @created 2020/6/2
     */
    public static function getDayOfWeekList(): array
    {
        return [
            1 => '周一',
            2 => '周二',
            3 => '周三',
            4 => '周四',
            5 => '周五',
            6 => '周六',
            7 => '周日',
        ];
    }
}
